#include <stdio.h>
#include <stdlib.h>
/**
*  Tutorial #8,#9,#10 (Data Structuring Case Study)
*  Program to find solution of tower of Hannoi
**/
int main3()
{
  printf("Enter the value of n");
  int n;
  scanf("%d",&n);
  printf("The steps for %d discs to move from A to B\n",n);
  towers(n,'A','B','C');
}

void towers(int n,char from,char to ,char via){
    if(n == 1){
        printf("Move from %c to %c\n",from,to);
    }else{
        towers(n-1,from,via,to);
        printf("Move from %c to %c\n",from,to);
        towers(n-1,via,to,from);
    }
}
